
const rename = function getName() {
  let pathList = JSON.parse(sessionStorage.getItem("url"))

  pathList.push({
    path: 'app.anly', name: '受注船'
  })

  pathList.push({
    path: 'app.userAdd', name: '系统管理'
  })
  pathList.push({
    path: 'app.shipSpecificationAdd', name: '加注船数据库'
  })
  pathList.push({
    path: 'app.work', name: '受注船'
  })
  pathList.push({
    path: 'app.load1', name: '作业数据库'
  })
  pathList.push({
    path: 'app.load2', name: '作业数据库'
  })
  pathList.push({
    path: 'app.fill1', name: '作业数据库'
  })
  pathList.push({
    path: 'app.fill2', name: '作业数据库'
  })
  pathList.push({
    path: 'app.dictDataAdd', name: '系统管理'
  })
  pathList.push({
    path: 'app.dictionaryDetail', name: '系统管理'
  })
  pathList.push({
    path: 'app.shipCertificateSeeSecond', name: '作业数据库'
  })
  pathList.push({
    path: 'app.fillSpecificationAddSecond', name: '作业数据库'
  })
  pathList.push({
    path: 'app.fillSpecificationAddSecond', name: '作业数据库'
  })
  pathList.push({
    path: 'app.lngStandardAddSecond', name: '作业数据库'
  })
  pathList.push({
    path: 'app.deviceCertificateAddSecond', name: '作业数据库'
  })
  pathList.push({
    path: 'app.lngStandardAddThird', name: '作业数据库'
  })

  let realPath = window.location.hash.slice(2);

  let pathRealName = ''
  pathList.forEach((element) => {
    if (realPath.includes(element.path) && element.path) {
      sessionStorage.setItem("changeName", element.name);
      pathRealName = element.name
    }
    if (realPath.includes("app.shipCertificateSeeSecond") == 1 || realPath.includes("app.fillSpecificationAddSecond") == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes("app.dictionaryDetail") == 1) {
      pathRealName = "系统管理"
    } else if (realPath.includes("app.shipSpecificationSeeSecond") == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes('app.fillSpecificationAddThrid') == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes('app.lngStandardAddSecond') == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes('app.deviceCertificateAddSecond') == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes('app.shipSpecificationSeeThird') == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes('app.lngStandardAddThird') == 1) {
      pathRealName = "加注船数据库"
    } else if (realPath.includes('app.haiGangZhiYuan') == 1) {
      pathRealName = "加注船数据库"
    }
  });
  sessionStorage.setItem('titleName', pathRealName)

  return pathRealName
}
export default rename